#include "global.h"

MODEL gridbox;
MODEL block[9];
void LoadGraphics()
{
    LoadModel(&gridbox, TEXT("GridBox.x"));
    LoadModel(&block[1], TEXT("Block1.x"));
    LoadModel(&block[2], TEXT("Block2.x"));
    LoadModel(&block[3], TEXT("Block3.x"));
    LoadModel(&block[4], TEXT("Block4.x"));
    LoadModel(&block[5], TEXT("Block5.x"));
    LoadModel(&block[6], TEXT("Block6.x"));
    LoadModel(&block[7], TEXT("Block7.x"));
    LoadModel(&block[8], TEXT("Block8.x"));
    LoadModel(&block[9], TEXT("Block9.x"));

    SetCamera();

    return;
}

void Render(OBJECT go[])
{
    StartRender();

    DrawModel(&gridbox, 0.0f, 0.0f, 0.0f);

    for(int Index = 0; Index < 637; Index++)
        DrawModel(&block[go[Index].bricktype],
                  Index % 7 - 3.5,
                  -Index / 49 + 5.5,
                  Index % 49 / 7 - 2.5f);

    EndRender();

    return;
}